<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>发表文章</title>
<link href="company_style.css" rel="stylesheet" type="text/css">
<script language='javascript' src='main.js'></script>
<script language="javascript">
<!--
function checkSubmit()
{

if(document.form1.title.value==""){
	 alert("文章标题不能为空！");
	 document.form1.title.focus();
	 return false;
}

if(document.form1.typeid.value==0){
	 alert("文章隶属栏目必须选择！");
	 return false;
}

if(document.form1.vdcode.value==""){
 document.form1.vdcode.focus();
 alert("验证码不能为空！");
 return false;
}

}
-->
</script>
</head>
<body leftmargin="0" topmargin="0">
<div align="center">
<?php  include(dirname(__FILE__)."/head.htm"); ?>
<table width="900" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td width="160" height="216" valign="top"> 
      <?php include(dirname(__FILE__)."/menu.php");?>
    </td>
    <td width="10">&nbsp;</td>
    <td  valign="top">
	<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" style="margin-top:10px;" class="turnleft">
        <tr>
		<td> 
        <div class="manage_company_right_title">
          <ul><li>发表新文章：</li></ul>
        </div>
		</td>
        </tr>
        <tr>
		<form name="form1" action="article_add_action.php" method="post" enctype="multipart/form-data" onSubmit="return checkSubmit();">
          <input type="hidden" name="dopost" value="addArc">
          <input type="hidden" name="channelid" value="<?php echo $channelid; ?>">  
          <td height="183" valign="top" style="padding-top:3px">
              <table width="100%" border="0" cellspacing="2" cellpadding="2" class="sendtable">
                <tr>
                  <td height="24" bgcolor="#F0FBE3"><strong>◆常规参数：</strong></td>
                </tr>
                <tr>
                  <td>
				  <table width="100%" border="0" cellspacing="0" cellpadding="0" class="bline">
                    <tr>
                      <td width="20%" height="28">文章标题：</td>
                      <td><input name="title" type="text" id="title" size="30" style="width:240px" class="company_manage_form_label" />
                        <font color="#FF0000">*</font></td>
                    </tr>
                  </table></td>
                </tr>
                <tr>
                  <td><table width="100%" border="0" cellspacing="0" cellpadding="0" class="bline">
                    <tr>
                      <td width="20%" height="28">文章出处：</td>
                      <td><input name="source" type="text" style="width:160px" id="source" size="30" class="company_manage_form_label" />
作者：
  <input name="writer" type="text" id="writer" style="width:120px" size="15" value="<?php echo $cfg_ml->M_UserName?>" class="company_manage_form_label" /></td>
                    </tr>
                  </table></td>
                </tr>
                <tr>
                  <td><table width="100%" border="0" cellspacing="0" cellpadding="0" class="bline">
                    <tr>
                      <td width="20%" height="28">隶属栏目：</td>
                      <td><?php 
           	 $selname = '请选择...';
           	 $delv = '0';
           	 if(!empty($cid)){
           	 	 $crow = $dsql->GetOne("Select ID,typename From #@__arctype where ID='$cid' ");
           	 	 $selname = $crow['typename'];
           	 	 $selv = $crow['ID'];
           	 }
           	 echo GetTypeidSelMember('form1','typeid','selbt1',$channelid,$selv,$selname,false);
			       ?></td>
                    </tr>
                  </table></td>
                </tr>
                <tr>
                  <td><table width="100%" border="0" cellspacing="0" cellpadding="0" class="bline">
                    <tr>
                      <td width="20%" height="28">验证码：</td>
                      <td><table width="200" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                          <td width="84"><input name="vdcode" type="text" id="vdcode" style="width:80px" size="10" class="yanzhengma" /></td>
                          <td width="116"><img src='../include/vdimgck.php' width='50' height='20' /></td>
                        </tr>
                      </table></td>
                    </tr>
                  </table></td>
                </tr>
                <tr>
                  <td><table width="100%" border="0" cellspacing="0" cellpadding="0" class="bline">
                    <tr>
                      <td width="20%" height="28">我的分类：</td>
                      <td>
                      	<select name="mtype" id="mtype" style="width:200px" class="company_manage_form_option">
                        <option value='0'>--请选择分类--</option>
                        <?php 
$dsql->SetQuery("Select * From #@__member_arctype where  memberid='".$cfg_ml->M_ID."' ;");
$dsql->Execute();
while($row = $dsql->GetObject()){
  echo "<option value='".$row->aid."'>".$row->typename."</option>\r\n";
}
?>
                        </select> 
						 </td>
                    </tr>
                  </table></td>
                </tr>
                <tr>
                  <td><table width="100%" border="0" cellspacing="0" cellpadding="0" class="bline">
                    <tr>
                      <td width="20%" height="28">内容简介：</td>
                      <td><textarea name="description" id="description" style="width:80%;height:50px"></textarea></td>
                    </tr>
                  </table></td>
                </tr>
                <tr>
                  <td><table width="100%" border="0" cellspacing="0" cellpadding="0" class="bline">
                    <tr>
                      <td width="20%" height="28">标签（TAG）：</td>
                      <td><input name="keywords" type="text" id="keywords" style="width:50%;" value="" class="company_manage_form_label" />
(多个标签（TAG）用空格分开) </td>
                    </tr>
                  </table></td>
                </tr>
                <tr>
                  <td><table width="100%" border="0" cellspacing="0" cellpadding="0" class="bline">
                    <tr>
                      <td width="20%" height="28">缩略图：</td>
                      <td><input name="litpic" type="file" id="litpic" style="width:300px" onchange="SeePic($Obj('picview'),$Obj('litpic'),$Obj('picarea'));" class="company_manage_form_label" /></td>
                    </tr>
                    <tr id="picarea" style='display:none'>
                      <td height="28">预　览：</td>
                      <td><img src="img/pview.gif" id="picview" width="150" height="120" /></td>
                    </tr>
                  </table></td>
                </tr>
                <?php PrintAutoFieldsAdd($cInfos['fieldset'],'autofield'); ?>
              </table>
			  <table width="100%" border="0" cellspacing="2" cellpadding="2" class="sendtable">
                <tr>
                  <td height="24" bgcolor="#F0FBE3"><strong>◆文章内容：<font color="#FF0000">*</font></strong></td>
                </tr>
                <tr>
                  <td><?php 
	GetEditor("body","",350,"Member");
?></td>
                </tr>
              </table>
              <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D9EDC0">
                
                
                <tr bgcolor="#F7FDF0"> 
                  <td width="400%" height="45" colspan="4" align="center"> <input name="imageField" type="image" src="img/button_save.gif" width="60" height="22" border="0"> 
                    &nbsp;&nbsp;&nbsp; <img src="img/button_reset.gif" width="60" height="22" style="cursor:hand" onClick="location.reload();">                  </td>
                </tr>
              </table></td>
			</form>
        </tr>
        <tr> 
          <td height="10"></td>
        </tr>
      </table> </td>
  </tr>
</table>
<?php 
$dsql->Close();
include(dirname(__FILE__)."/foot.htm");
?>
</div>
</body>
</html>
